var pictureInfo = {};

pictureInfo.build = function(picture, title, description) {

   Ti.Media.vibrate([0, 35]);
   
   var win = Ti.UI.createWindow({
       backgroundColor: '#fff',
       layout: 'vertical',
       navBarHidden:true,
   });
   
   var pictureInfoView = Ti.UI.createScrollView({
       height: Ti.UI.FILL,
       width: Ti.UI.FILL,
       layout: 'vertical' 
       
   });
   
    var header = Ti.UI.createView({
       width: Ti.UI.FILL,
       height: '85dip',
       backgroundImage: '/images/header.png',
       top: 0
    });
    var hdrtitle = Ti.UI.createLabel({
	    color: '#fff',
	    font: {fontSize:'20dip' },
	    top: '18dip',
	})
    hdrtitle.text = title;
    
    if(Ti.Platform.name != 'android')
    {
        var backButton = Ti.UI.createButton({
            title: 'Terug', 
            left: '10dip',
            top: '10dip',
            width: Ti.UI.SIZE,
            height: Ti.UI.SIZE,
            color: '#090C16',    
            visible: true
        });
        
        backButton.addEventListener('click', function() {
            win.close;
        });
        
        header.add(backButton);
  	}
    
    
    
    header.add(hdrtitle);
    win.add(header);
   
    var picture = Ti.UI.createImageView({
        top: '10dip',
        width: '300dip',
        image: picture,
        //canScale: true
     });
   
   pictureInfoView.add(picture);
   
   var descriptionLabel = Ti.UI.createLabel({
      top: '10dip',
      text: description, 
      color: '#000',
      width: '300dip'
      
       
   });
   
   pictureInfoView.add(descriptionLabel);
   
   var spacer = Ti.UI.createView({
      height: '10dip',
      width: Ti.UI.FILL 
   });
   
   pictureInfoView.add(spacer);
   
   
   win.add(pictureInfoView);
    win.open();
}